Skip to content

Conversation

@sam-mfb
Copy link
Owner

@sam-mfb sam-mfb commented May 2, 2025

CI/CD Automation

  • Added .github/workflows/npm-publish.yml to automate publishing to NPM upon release. This workflow includes steps for building, testing, and publishing the package.
  • Added .github/workflows/unit-tests.yml to run linting, unit tests, and builds on pull requests and pushes to the main branch.

Installation and Usage Improvements

  • Updated README.md with detailed installation instructions, including a new recommended method to install via npm and usage instructions for both host and container environments. [1] [2]
  • Added browser-global.sh, a script to handle browser requests in containerized environments, and documented its usage.

Package Enhancements

  • Updated package.json to:
    • Define CLI commands (o2f-server, o2f-client, o2f-browser) for global installation.
    • Add metadata such as repository URL, keywords, and supported Node.js versions.
    • Update dependencies and devDependencies to their latest versions for better compatibility.

Build Process

  • Added prepend-shebang.js, a script to prepend shebangs to CLI files and make them executable. This ensures proper behavior when installed globally.

@sam-mfb sam-mfb requested a review from Copilot May 2, 2025 19:54
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR introduces improvements for CI/CD automation, installation instructions, and package enhancements including global CLI command definitions and automated shebang prepending.

  • Adds GitHub Actions workflows for unit tests and NPM publishing.
  • Updates README.md with clearer installation and usage instructions.
  • Introduces a shebang-prepending script for CLI files to ensure correct execution when installed globally.

Reviewed Changes

Copilot reviewed 5 out of 7 changed files in this pull request and generated 1 comment.

File Description
prepend-shebang.js Adds shebang and file permission handling for server and client CLI scripts.
README.md Updates installation instructions and usage details with npm and manual options.
.github/workflows/unit-tests.yml Defines a workflow to run tests, linting, and builds on PRs and pushes to main.
.github/workflows/npm-publish.yml Implements automated publishing to NPM upon release.
Files not reviewed (2)
  • browser-global.sh: Language not supported
  • package.json: Language not supported

const path = require('path');

const shebang = '#!/usr/bin/env node\n';
const files = ['o2f-server.js', 'o2f-client.js'];
Copy link

Copilot AI May 2, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The 'files' array is missing 'o2f-browser.js', which is defined as a CLI command in package.json. Consider adding it to ensure that the shebang is prepended for all relevant CLI files.

Suggested change
const files = ['o2f-server.js', 'o2f-client.js'];
const files = ['o2f-server.js', 'o2f-client.js', 'o2f-browser.js'];

Copilot uses AI. Check for mistakes.
@sam-mfb sam-mfb merged commit ee5d4b1 into main May 2, 2025
1 check passed
@sam-mfb sam-mfb deleted the version-1.1 branch October 30, 2025 22:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants